{% extends 'cdserver/base_list_view.html' %}
{% load static %}

{% block title %} 发行日志列表 {% endblock %}

{% block page_title %}
发行日志列表
{% endblock %}

{% block new_button %}
新建发版草稿
{% endblock%}

{% block create_url %}
{% url 'draft_add' %}
{% endblock %}

{% block list_name %}
发版草稿列表
{% endblock %}


{% block list_items %}
<th>ID</th>
<th>产品名称</th>
<th>发行版本</th>
<th>创建时间</th>
<th>状态</th>
<th>操作</th>
{% endblock list_items %}

{% block queryset_list %}
{% for obj in object_list %}
    <tr>
        <th> {{ obj.id }} </th>
        <td> {{ obj.product.name }}</td>
        <td> {{ obj.release_version }} </td>
        <td> {{ obj.created_time|date:"Y-m-d H:i:s" }} </td>
        <td> {{ obj.submit_time |date:"Y-m-d H:i:s" }} </td>
        <td> <span class="label label-success">{{ obj.get_status_display}}</span> </td>
        <td>
            <a class="view button is-link is-small" href="{% url 'draft_detail' obj.id %}"> 查 看 </a>
        </td>
    </tr>
{% endfor %}
{% endblock queryset_list %}

{% block footer %}
    <div class="container">
        {#  分页  #}
        <nav class="pagination is-rounded" role="navigation" aria-label="pagination">
            {{ page_string }}
        </nav>
    </div>
    <div class="mt-5"></div>
{% endblock %}

